import matplotlib.pyplot as plt

# 数据
years = ['2023', '2022', '2021']
net_profit = [441212.483, 307291.635, 159313.179]

# 创建柱形图
plt.bar(years, net_profit, color='skyblue')

# 在每个柱子上添加数值标签
for i, v in enumerate(net_profit):
    plt.text(i, v + 5000, f'{v:.1f}', ha='center', color='black')

# 设置标题和坐标轴标签
plt.title('Ningde Times Net Profit Comparison')
plt.xlabel('Time (Year)')
plt.ylabel('Net Profit (Ten thousand yuan)')

# 显示图表
plt.show()